package com.otherTest.designpattern.creationalpattern.prototype;


import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @Description: 原型模式 实体类
 * 需要实现cloneable接口，已完成clone功能
 * @author: conceit
 * @Date: 2018/9/3 14:17
 */

@AllArgsConstructor
public class ResumePrototype implements Cloneable{

    private String name;
    private String phoneNum;
    private int age;
    private String sex;
    private String school;



    @Override
    public Object clone(){
        ResumePrototype resumePrototype=null;
        try {
            resumePrototype = (ResumePrototype) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        return resumePrototype;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }
}
